package cn.yunyichina.provider.pay.pacity.service;

import cn.yunyichina.utils.constants.Encoding;

import javax.annotation.Resource;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Properties;

/**
 * Created by Lullaby on 2017/6/15.
 */
public class BaseService {

    @Resource
    private Properties yaml;

    protected String getConfig(String key) {
        return yaml.getProperty(key);
    }

    protected String buildPacityPostRequestContent(String content, String sign) throws UnsupportedEncodingException {
        return content + "&sign=" + URLEncoder.encode(sign, Encoding.UTF8);
    }

}
